package com.example.building_material_mannager.controller;

import com.example.building_material_mannager.entity.Factory;
import com.example.building_material_mannager.service.FactoryService;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class FactoryController {
    @Resource
    FactoryService factoryService;
    //展示
    public void showCustomer(Factory factory){

        List<Factory> customers = factoryService.showFactory(factory);
    }
    //增加
    public void addCustomer(Factory factory){

        boolean re = factoryService.addFactory(factory);
        System.out.println(re);
    }
    //刪除
    public void delCustomer(Integer fid){

        boolean re = factoryService.delFactory(fid);
        System.out.println(re);
    }
    //更新
    public void upCustomer(Factory factory){

        boolean re = factoryService.upCustomer(factory);
        System.out.println(re);
    }

}
